package com.endoc.news;

import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentTransaction;

import android.os.Bundle;
import android.widget.FrameLayout;

import com.endoc.news.fragment.homefragment.HomeFragment;
import com.orhanobut.logger.AndroidLogAdapter;
import com.orhanobut.logger.Logger;



public class MainActivity extends AppCompatActivity {
    private FrameLayout flRoot;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Logger.addLogAdapter(new AndroidLogAdapter());
        flRoot = (FrameLayout) findViewById(R.id.fl_root);
        FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
        HomeFragment homeFragment = new HomeFragment();
        fragmentTransaction.add(R.id.fl_root,homeFragment);
        fragmentTransaction.commit();
        fragmentTransaction.show(homeFragment);
    }


    @Override
    protected void onResume() {
        super.onResume();

    }

}
